package com.itheima.neicuntu;

import java.time.Period;

public class Demo {

    public static void main(String[] args) {
        Student student = new Student();
        System.out.println(student.getName());
        System.out.println(student.getAge());
        Student zhangsan = new Student("张三", 18);
        System.out.println(zhangsan.getName());
        System.out.println(zhangsan.getAge());
    }
}

class Person{
    private String name;
    private int  age;

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}

class Student extends Person{

    public Student() {
        super();
    }

    public Student(String name, int age) {
        super(name, age);
    }
}
